package ru.cybertek.dao;

import java.util.List;

import ru.cybertek.domain.Account;
import ru.cybertek.domain.Bank;

/**
 * @author Nikolay Demyankov
 * @version $Revision: 10 $
 * 
 *          (C) Copyright 2009 CyberTek Ltd. All rights reserved.
 */
public interface BankDao
{
    /**
     * Returns list of banks.
     * 
     * @return List of {@link ru.cybertek.domain.Bank} objects.
     */
    public List<Bank> getBankList();

    /**
     * Returns {@link ru.cybertek.domain.Bank} for given id.
     * 
     * @param id
     *            Bank id.
     * 
     * @return {@link ru.cybertek.domain.Bank} object.
     */
    public Bank getBank(Integer id);

    /**
     * Saves new {@link ru.cybertek.domain.Bank} in database or updates existing
     * Bank.
     * 
     * @param bank
     *            {@link ru.cybertek.domain.Bank} object to save or update.
     */
    public void saveBank(Bank bank);

    /**
     * Deletes {@link ru.cybertek.domain.Bank} from database.
     * 
     * @param id
     *            Id of {@link ru.cybertek.domain.Bank} to delete.
     */
    public void deleteBank(Integer id);

    /**
     * Returns list of {@link ru.cybertek.domain.Bank} accounts.
     * 
     * @param personId
     *            Id of {@link ru.cybertek.domain.Person}.
     * 
     * @return List of {@link ru.cybertek.domain.Account} for given Person.
     */
    public List<Account> getBankAccounts(Integer bankId); // ???do we need this
}
